<!doctype html>
<HTML>  
<HEAD>
<meta charset="utf-8">  
<style type="text/css">
body{
    font-size:130px;
    text-align:center;
}
input{
    width:350px;
    height:140px;
    font-size:70px;
}
</style>
 <TITLE>抽签</TITLE>  
 <SCRIPT LANGUAGE="JavaScript">  
var names = [
"张荔荔","周杰伦","陈奕迅"
]; 

var index = -1;
var time;  
function begin(){  
document.getElementById("btnBegin").disabled = true;  
chouqian();
}  
function chouqian(){
index = Math.floor(Math.random()*1000 % names.length);
//index = Math.random()<0.3?0:index;
document.getElementById("result").innerHTML = names[index];  

time = window.setTimeout(chouqian,2);  
}  
function end(){ 
window.clearTimeout(time);
document.getElementById("btnBegin").disabled = false;
} 
</SCRIPT>  
</HEAD>  
<BODY>  
<div>  
<h3>谁是🐷</h3>  
<h3 id="result" style="color:blue;">^_^</h3>  
<INPUT TYPE="button" VALUE="开始" id="btnBegin" ONCLICK="begin();">   
<INPUT TYPE="button" VALUE="结束" id="btnEnd" ONCLICK="end();">  
</div>  
</BODY>  
</HTML>